package com.taoge.p4.sys;

import com.taoge.p4.common.entity.ResponseData;
import com.taoge.p4.common.params.IdParam;
import com.taoge.p4.common.service.ProductCategoryService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequiredArgsConstructor
@RequestMapping("/sys/productCategory")
public class ProductCategoryController {
    private final ProductCategoryService productCategoryService;

    @PostMapping
    public ResponseData<?> edit(){
        return ResponseData.success();
    }

    @PostMapping("/sort")
    public ResponseData<?> sort(@RequestBody IdParam param){
        productCategoryService.sort(param.getIds());
        return ResponseData.success();
    }

}
